package com.example.clickity.app;

import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

/**
 * Created by s2080341 on 5/12/14.
 */


public class GameState {
    long numClicks;
    View rootView;
    double score;


    void upgrade_one(){
        if (numClicks == 1 && score >= 500){
             TextView message = (TextView)rootView.findViewById(R.id.textView_score);
             String value = message.toString();
             Double num = Double.parseDouble(value);//turns text in textView into a double

             String a = Double.toString(num - 500);
             message.setText(a);
             numClicks=5*numClicks;

        }

    }
    void click(){



            TextView message = (TextView)rootView.findViewById(R.id.textView_score);
            String value = message.toString();
            Double num = Double.parseDouble(value);//turns text in textView into a double

            String n = Double.toString(num+numClicks);//adds one gold to score for every click
            message.setText(n);//shows it


    }
}
